package com.sun.boot.controller;

import com.sun.boot.domain.Car;
import com.sun.boot.domain.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    private Car car;

    @Autowired
    private Person person;

    @GetMapping(value = "/car")
    public Car getCar(){
        return car;
    }

    @GetMapping(value = "/person",produces = "application/json;charset=UTF-8")
    public Person getPerson(){
        return person;
    }
}
